import http from '../https'
// const baseURL = "http://192.168.1.122:8080"
const baseURL = "http://82.157.143.31:8080"

// 初始化患者管理列表
const initPatientsTable = (obj) => http({
    url: `${baseURL}/customer/customerInitializeLikeFind`,
    method: 'get',
    params: {
        ...obj
    }
})

// 初始化患者管理增加和删除的下拉列表(公海、有效)
const initPatientsTableAdd = () => http({
    url: `${baseURL}/customer/customerInitializeAddUpdate`,
    method: 'get',
})

// 导出患者管理
const daoChu = () => http({
    url: `${baseURL}/customer/customerInformationExcelOutput`,
    method: 'get',
    responseType: 'blob'
})

// 患者管理--新增
const PatientsTableAdd = (obj) => http({
    url: `${baseURL}/customer/customerAdd`,
    method: 'post',
    data: {
        ...obj
    }
})

// 患者管理--修改
const PatientsTableModify = (obj) => http({
    url: `${baseURL}/customer/customerUpdate`,
    method: 'post',
    data: {
        ...obj
    }
})

// 患者管理--删除
const PatientsTableDelete = (obj) => http({
    url: `${baseURL}/customer/customerDelete`,
    method: 'post',
    data: {
        ...obj
    }
})

// 患者管理--初始化转交的部门
const initPatientsTableBuMen = () => http({
    url: `${baseURL}/customer/seaCustomerDept`,
    method: 'get',
})

// 患者管理--初始化转交的人员
const initPatientsTableRenYuan = (obj) => http({
    url: `${baseURL}/customer/seaCustomerEmployee`,
    method: 'get',
    params: {
        ...obj
    }
})

// 患者管理--转交的确认提交
const zhuanJiaoSub = (obj) => http({
    url: `${baseURL}/customer/seaCustomerTransfer`,
    method: 'post',
    data: {
        ...obj
    }
})

// 患者管理--高级搜索,患者管理--模糊搜索
const gaoJiSearchSubmit = (obj) => http({
    url: `${baseURL}/customer/customerInitializeLikeFind`,
    method: 'get',
    params: {
        ...obj
    }
})

export {
    initPatientsTable,
    initPatientsTableAdd,
    daoChu,
    PatientsTableAdd,
    PatientsTableModify,
    PatientsTableDelete,
    initPatientsTableBuMen,
    initPatientsTableRenYuan,
    zhuanJiaoSub,
    gaoJiSearchSubmit
}